return (trunc((s + (item two of the clickloc) - (item two of the rect of the target)) div the textheight of the target) + one)
end Clickline
on returnKey
global searchIndex
if searchIndex is not empty and the visible of the msg box is false then
put "find" && quote & searchIndex & quote && "in field 1" into continueSearch
set cursor to 4
set lockScreen to true
do ContinueSearch
if the result is "not found" then
answer searchIndex && "not found"
else if the short name of this card is not "Index" then
go back
answer searchIndex && "not found"
end if
set lockScreen to false
else
pass returnKey
end if
end returnKey
on indexSearch
global searchIndex
if searchIndex is not empty then
ask "Enter word to look up in index:" with searchIndex
else
ask "Enter word to look up in index:"
end if
if it is not empty then
set cursor to 4
put it into searchIndex
set lockScreen to true
find searchIndex in field 1
if the result is "not found" then
answer searchIndex && "not found"
else if the short name of this card is not "Index" then
go back
answer searchIndex && "not found"
end if
set lockScreen to false
end if
end indexSearch
on makeIndex
--special version for this stack
set lockScreen to true
set lockMessages to true
go to card 2
put empty into field "index" of last card
repeat for (the number of cards-2)
put the short name of this card & return after thisSetofTopics
go to next card
end repeat
put order(thisSetofTopics,return) into thisSetofTopics
go to last card of this stack
put thisSetofTopics & return into field "Index"
insertLetters
set lockScreen to false
set lockMessages to false
end makeIndex
on insertLetters
put "abcdefghijklmnopqrstuvwxyz" into alphabet
put 1 into alphaPointer
put 1 into LineStart
repeat 26 times
put char alphaPointer of alphabet into thisLetter
repeat with J = LineStart to the number of lines in field 1
if first char of line J of field 1 is thisLetter then
put thisLetter & "____________________________________________" & the numToChar of (the charToNum of thisletter - 32) & return before line J of field 1
put J into LineStart
exit repeat
end if
end repeat
add 1 to alphaPointer
end repeat
end insertLetters
on goIndex
--Called by Select field when user clicks on line.
get lineSelect()
if it is empty or it contains "___________" then exit goIndex
set cursor to 4
--put diamondItem (it) into thisLink
--delete last char of item 2 of thisLink
go to card (it)
end goIndex
-- part 5 (field)
-- low flags: 01
-- high flags: 0001
-- rect: left=141 top=46 right=68 bottom=367
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 2
-- text size: 14
-- style flags: 1024
-- line height: 18
-- part name:
-- part 11 (field)
-- low flags: 01
-- high flags: 0001
-- rect: left=31 top=45 right=69 bottom=89
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 21
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name:
-- part 13 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=478 top=314 right=342 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 7417 / 7417
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Go Back
----- HyperTalk script -----
on mouseUp
go back
end mouseUp
-- part 14 (field)
-- low flags: 81
-- high flags: 0007
-- rect: left=103 top=131 right=326 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Added Index Entries
-- part 17 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=41 top=146 right=175 bottom=68
-- title width / last selected line: 0
-- icon id / first selected line: 8538 / 8538
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Search
----- HyperTalk script -----
on mouseUp
indexSearch
end mouseUp
-- part 31 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=40 top=92 right=116 bottom=62
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 18
-- style flags: 0
-- line height: 24
-- part name:
----- HyperTalk script -----
on closeField
get first char of card field 4
if the version is 1.2 then
get first char of card field 4
find whole (it) in field 1
put it into card field 4
else
get it & "___"
find (it) in field 1
put first char of it into card field 4
end if
end closeField
-- part 32 (button)
-- low flags: 00
-- high flags: 8002
-- rect: left=391 top=46 right=68 bottom=426
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 2048
-- line height: 13
-- part name: EXIT
----- HyperTalk script -----
on mouseUp
exitScript
end mouseUp
-- part 33 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=430 top=46 right=78 bottom=471
-- title width / last selected line: 0
-- icon id / first selected line: 237 / 237
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Contents
----- HyperTalk script -----
on mouseUp
go to stack "Nutshell"
end mouseUp
-- part 34 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=32 top=255 right=298 bottom=73
-- title width / last selected line: 0
-- icon id / first selected line: 30557 / 30557
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Subjects
----- HyperTalk script -----
on mouseUp
go to card 2
end mouseUp
-- part contents for card part 5
----- text -----
Guide
-- part contents for card part 11
----- text -----
Index
-- part contents for card part 14
----- text -----
shell escape,card id 56610
dollar sign metacharacter in regular expressions,card id 20690
ampersand metacharacter in regular expressions,card id 21862
vi keyboard summary,card id 7347
keyboard summary (vi) ,card id 7347
asterisk metacharacter in regular expressions,card id 19459
dot metacharacter in regular expressions,card id 13218
angle brackets (ex),card id 57678
equal sign (ex),card id 57207
line number (ex),card id 57207
square brackets in regular expressions,card id 19874
escaped parentheses in regular expressions,card id 21379
backslash in regular expressions,card id 20991
newline escape in regular expressions,card id 21661
escaped braces in regular expressions,card id 20002
braces in regular expressions,card id 20002
caret in regular expressions,card id 20270
line addressing (sed),card id 7142
pattern addressing (sed),card id 7142
alphabetical key summary (vi),card id 29476
options (vi),card id 30305
operators (vi),card id 25440
change(vi),card id 25440
delete(vi),card id 25440
yank(vi),card id 25440
keys not used in command mode (vi),card id 29858
uppercase conversions in regular expressions,card id 22518
lowercase conversions in regular expressions,card id 22518
copy (ex),card id 34969
copy or yank(vi),card id 25440
moving (vi),card id 28287
multiple Files (vi),card id 26781
awk (use of regular expressions),card id 22092
exiting ex (ex),card id 32131
X command (sed),card id 60430
syntax (ex),card id 75652
line number (sed),card id 2632
global (ex),card id 37016
insert command (vi),card id 27245
append command (vi),card id 27245
shell escape (vi),card id 28859
UNIX escape (vi),card id 28859
wildcards in regular expressions,card id 13053
quit (vi),card id 26574
objects (vi),card id 25849
screen editor,card id 12578
ESCape Key in vi,card id 23823
word object in vi,card id 25849
section object in vi,card id 25849
paragraph object in vi,card id 25849
sentence object in vi,card id 25849
w command in vi,card id 26574
e command in vi,card id 26781
n command in vi,card id 26781
commands used in insert mode,card id 27245
cursor keys in vi,card id 22865
movement by lines in vi,card id 22865
movement by word in vi,card id 22865
movement by sentence in vi,card id 22865
movement by paragraph in vi,card id 22865
repeat change in vi,card id 27484
put command in vi,card id 27484
substitute command in vi,card id 27484
replace command in vi,card id 27484
undo command in vi,card id 27484
deleting lines up to a pattern in vi,card id 27687
d command in vi,card id 27687
forward search in vi,card id 28152
backward search in vi,card id 28152
find command in vi,card id 28152
f command in vi,card id 28152
t command in vi,card id 28152
, command in vi,card id 28152
% command in vi,card id 28152
/ command in vi,card id 28152
N command in vi,card id 28152
y command in vi,card id 28287
m command in vi,card id 28624
map command in vi,card id 29018
ab command in vi,card id 29018
quote character in vi,card id 29206
shift lines in vi,card id 29206
set command in vi,card id 30141
a command in sed,card id 4327
b command in sed,card id 6767
c command in sed,card id 8698
d command in sed,card id 9296
D command in sed,card id 9740
g command in sed,card id 10974
G command in sed,card id 11350
h command in sed,card id 12013
H command in sed,card id 12334
i command in sed,card id 13657
l command in sed,card id 14193
n command in sed,card id 14777
N command in sed,card id 15325
p command in sed,card id 15772
P command in sed,card id 16245
q command in sed,card id 16647
r command in sed,card id 17220
s command in sed,card id 17810
t command in sed,card id 23176
w command in sed,card id 32766
y command in sed,card id 61165
= command in sed,card id 2632
syntax of ex commands,card id 76175
ab command in ex,card id 6561
a command in ex,card id 33607
ar command in ex,card id 33111
c command in ex,card id 34383
co command in ex,card id 34969
d command in ex,card id 35397
e command in ex,card id 36048
f command in ex,card id 36355
g command in ex,card id 37016
i command in ex,card id 37432
j command in ex,card id 38010
k command in ex,card id 38648
l command in ex,card id 38931
ma command in ex,card id 40059
m command in ex,card id 40529
n command in ex,card id 41170
nu command in ex,card id 42559
o command in ex,card id 43041
pre command in ex,card id 43742
p command in ex,card id 44038
pu command in ex,card id 44730
q command in ex,card id 41635
r command in ex,card id 42208
rec command in ex,card id 45727
rew command in ex,card id 46244
se command in ex,card id 46717
sh command in ex,card id 47178
so command in ex,card id 47738
su command in ex,card id 48150
t command in ex,card id 48888
ta command in ex,card id 49326
una command in ex,card id 49897
u command in ex,card id 50339
unm command in ex,card id 50739
v command in ex,card id 51390
ve command in ex,card id 51929
vi command in ex,card id 52727
w command in ex,card id 53547
wq command in ex,card id 54565
x command in ex,card id 55049
ya command in ex,card id 55802
+ in regular expressions,card id 22092
() in regular expressions,card id 22092
parentheses in regular expressions,card id 22092
angle brackets in regular expressions,card id 22092